package com.zhiyou100.serice.Impl;

import com.zhiyou100.mapper.VideoMapper;
import com.zhiyou100.model.Video;
import com.zhiyou100.serice.VideoSerice;
import org.springframework.beans.factory.annotation.Autowired;
import org.springframework.stereotype.Service;

import java.util.List;

@Service
public class VideoSericeImpl  implements VideoSerice {
    @Autowired
    private VideoMapper mapper;

    public List<Video> findAll(String title,Integer speakerId,Integer courseId) {
        return mapper.findAll(title,speakerId,courseId);
    }

    public Video findById(Integer id) {
        return mapper.findById(id);
    }

    public void update(Video id) {
        mapper.update(id);
    }

    public void delete(Integer id) {
        mapper.delete(id);
    }

    public void add(Video video) {
        mapper.add(video);
    }

    public List<Video> findByCourseId(Integer id) {
        return mapper.findByCourseId(id);
    }
}
